package com.dao;


import com.domain.Goods;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface IGoodsDAO {
    @Select("select * from tb_goods where id = #{id}")
    Goods selectOne(Integer id);

    @Select("select * from tb_goods")
    List<Goods> findGoods();

    @Delete("delete from tb_goods where id = #{id}")
    Integer deleteById(Integer id);

    @Insert("insert into tb_goods(name,remark,createdTime) values(#{name},#{remark},now())")
    Integer insertObject(Goods goods);



    @Update("update tb_goods set name=#{name},remark=#{remark} where id=#{id}")
    Integer updateGoods(Goods goods);
}
